/*
 * Copyright (c) 2009 Enio Perpetuo
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * 		http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 *  
 */
package co.za.gvi.handler;

import co.za.gvi.message.ResponseMessage;
import co.za.gvi.message.SmsMessage;

/**
 * This interface must be implemented to handle the different types of 
 * <code>ResponseMessage</code> such as <code>REPLY</code> messages, <code>RECEIPT</code> 
 * messages and <code>ERROR</code> messages.
 * <p>
 * The class that implements this interface is invoked by <code>IncomeMessageServlet</code>
 * when a new message arrives and it must implement the following methods:
 * <ul>
 *   <li><code>onReplyMessage</code> - implement this method to handle the <code>REPLY</code> messages</li>
 *   <li><code>onReceiptMessage</code> - implement this method to handle the <code>RECEIPT</code> messages</li>
 *   <li><code>onErrorMessage</code> - implement this method to handle the <code>ERROR</code> messages</li>
 * </ul>
 * 
 * @see co.za.gvi.servlet.IncomeMessageServlet
 * @see co.za.gvi.message.ResponseMessage
 * 
 * @author Enio Perpetuo
 */
public interface IncomeMessageHandler {
	
	/**
	 * This method is responsible for handling the <code>REPLY</code> message
	 * @param responseMessage The income message
	 */
	public void onReplyMessage(ResponseMessage responseMessage);
	
	/**
	 * This method is responsible for handling the <code>RECEIPT</code> message
	 * @param responseMessage The income message
	 */
	public void onReceiptMessage(ResponseMessage responseMessage);
	
	/**
	 * This method is responsible for handling the <code>ERROR</code> message
	 * @param responseMessage The income message
	 */
	public void onErrorMessage(ResponseMessage responseMessage);

	/**
	 * This method is responsible for handling the <code>SmsMessage</code>
	 * @param smsMessage The income message
	 */
	public void onSmsMessage(SmsMessage smsMessage);
}
